package IpsBankList;

public class ServiceSoapProxy implements IpsBankList.ServiceSoap {
	private String _endpoint = null;
	private IpsBankList.ServiceSoap serviceSoap = null;

	public ServiceSoapProxy() {
		_initServiceSoapProxy();
	}

	public ServiceSoapProxy(String endpoint) {
		_endpoint = endpoint;
		_initServiceSoapProxy();
	}

	private void _initServiceSoapProxy() {
		try {
			serviceSoap = (new IpsBankList.ServiceLocator()).getServiceSoap();
			if (serviceSoap != null) {
				if (_endpoint != null)
					((javax.xml.rpc.Stub) serviceSoap)
							._setProperty(
									"javax.xml.rpc.service.endpoint.address",
									_endpoint);
				else
					_endpoint = (String) ((javax.xml.rpc.Stub) serviceSoap)
							._getProperty("javax.xml.rpc.service.endpoint.address");
			}

		} catch (javax.xml.rpc.ServiceException serviceException) {
		}
	}

	public String getEndpoint() {
		return _endpoint;
	}

	public void setEndpoint(String endpoint) {
		_endpoint = endpoint;
		if (serviceSoap != null)
			((javax.xml.rpc.Stub) serviceSoap)._setProperty(
					"javax.xml.rpc.service.endpoint.address", _endpoint);

	}

	public IpsBankList.ServiceSoap getServiceSoap() {
		if (serviceSoap == null)
			_initServiceSoapProxy();
		return serviceSoap;
	}

	public java.lang.String getBankList(java.lang.String merCode,
			java.lang.String signMD5) throws java.rmi.RemoteException {
		if (serviceSoap == null)
			_initServiceSoapProxy();
		return serviceSoap.getBankList(merCode, signMD5);
	}

}